import models.db as db
from flask import request,  jsonify


def login():
    user = request.get_json()
    sql = "select * from users where name = ? and password = ?"
    db.get_db(sql, (user['username'], user['password']))
    return jsonify({'status': '200', 'msg': '登录成功！'})
